import request from '@/utils/request'
//5、根据分类id查询品牌列表
export const FindBrandByCategoryId = categoryId => {
  return request({
    url: `/admin/product/categoryBrand/listBrandsByCategoryId/${categoryId}`,
    method: 'GET',
  })
}
//1、条件查询分类品牌 分页数据
export const GetPage = (pageNum, pageSize, data) => {
  return request({
    url: `/admin/product/categoryBrand/page/${pageNum}/${pageSize}`,
    method: 'GET',
    params: data,
  })
}
//2、根据id删除
export const DeleteById = id => {
  return request({
    url: `/admin/product/categoryBrand/${id}`,
    method: 'DELETE',
  })
}
//3、新增
export const Save = data => {
  return request({
    url: `/admin/product/categoryBrand`,
    method: 'POST',
    data,
  })
}
//4、更新
export const UpdateById = data => {
  return request({
    url: `/admin/product/categoryBrand`,
    method: 'PUT',
    data,
  })
}
